package org.codehaus.mojo.wagon.shared;

import org.apache.maven.plugin.logging.Log;
import org.apache.maven.wagon.Wagon;
import org.apache.maven.wagon.WagonException;

import java.io.IOException;

/**
 *
 */
public interface WagonCopy {

    /**
     * Transfer files between 2 Wagon URLs. If download directory is not given in the fileset a temporary one will be
     * created.
     *
     * @param fromWagon - source Wagon
     * @param fileset   - file set to copy
     * @param toWagon   - target Wagon
     * @param optimize  - locally compressed and remotely uncompress for scp only
     * @param logger    - logger used
     * @throws WagonException if any wagon error
     * @throws IOException    if any io error
     */
    void copy(Wagon fromWagon, WagonFileSet fileset, Wagon toWagon, boolean optimize, Log logger) throws WagonException, IOException;

}
